Returns the difference between two date/time values based on an interval type.
Syntax
DateDiff("IntervalType", "FromDateTime", "ToDateTime")
Arguments
| Argument | Description |
|---|---|
| IntervalType | Time interval type. |
| FromDateTime | Any date/time expression. See Date/time format examples for valid formats. |
| ToDateTime | Any date/time expression. See Date/time format examples for valid formats. |
| String | Interval |
|---|---|
| d | Day |
| y | Day of year |
| h | Hour |
| n | Minute |
| m | Month |
| q | Quarter |
| s | Second |
| w | Weekday |
| ww | Week of year |
| yyyy | Year |
QA Wizard Pro counts interval types using the following methods:
Return value
| Value | Description |
|---|---|
| Value | Difference between two date/time values based on the interval. |
Example
numDays = DateDiff("d", "3 Feb 1962", Now())